<template>
  <div class="more">
    <div class="all-title">{{title}}</div>
    <div class="more-text" @click="goMore(categoryId)">更多</div>
  </div>
</template>

<script>
export default {
  name:'titleMore',
  props: {
    title: {
      type: String,
      default: ""
    },
    categoryId:{
      type:Number,
      default: 0
    }
  },
  methods: {
    goMore(categoryId) {
      this.$router.push({
        path:'/more',
        query:{categoryId}
      })
    }
  },
};
</script>

<style lang="scss" scoped>
.more {
  width: 100%;
  height: 0.8rem;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.3rem;
  .all-title {
    width: 80px;
    text-align: center;
    border-left: 3px solid #9fc6ff;
  }
  .more-text{
    background: #ccc;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 2px;
  }
}
</style>